<?php
    
    /*
    * 畅远科技签名
    */
    function apiChangyuanSign($list, $md5key) {
       ksort($list);
       $md5str = '';
       foreach ($list as $key => $val) {
           if(!empty($val)){
               $md5str = $md5str . $key . '=' . $val . '&';
           }
       }
       $sign = strtoupper(md5($md5str . 'key=' . $md5key));
       return $sign;
    }
